feat(pm): census the open cards whose named changeset target is already consumed - #17245
Merged
Merged
Conversation
…dy consumed A card whose deliverable is one line in a pending `.changeset/*.md` carries a hard deadline that nothing measured: once a release compiles the file into `packages/<pkg>/CHANGELOG.md` the one-line edit is gone, while the card's prose goes on asserting the file is "still pending" forever. `scripts/pm/changeset-deadline-census.mjs` is the detection half, report-only: it scans open issue BODIES for concrete `.changeset/<name>.md` paths and reports each target's state on the ref. Presence is a LINE COUNT corroborated against a single `.changeset/` listing — never an exit code, because `git ls-tree` exits 0 when nothing matches — and every run establishes a corpus, a positive and a negative control before it judges a row, refusing outright when one fails. An absent path is asked whether it ever landed, inside a history horizon proved per row against the card's own filing date, so a shallow clone yields `inconclusive` rather than a guess. The blind spots are printed by every run. Nothing here fails a build: the new population is censused before anything is enforced. Only the offline self-test runs in CI. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
baozhoutao
marked this pull request as ready for review
September 9, 2026 22:07
baozhoutao
enabled auto-merge
September 9, 2026 22:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16850
Clause-②: no
skip-changeset: root
package.jsonis"private": true, and the other two paths arescripts/pm/**and.github/workflows/**— nothing any package'sfiles[]ships moves.What this lands
The detection half of #16850, report-only:
scripts/pm/changeset-deadline-census.mjs.A card whose deliverable is one line in a pending
.changeset/*.mdcarries a hard deadline that nothing measured. Once a release compiles the file intopackages/PKG/CHANGELOG.mdthe one-line edit is gone, while the card's prose goes on asserting the file is "still pending" forever — prose does not re-measure itself.The dispatch ruling took the card's option 1 and this lane's standing rule verbatim:
⇒ ⛔ Option 2 (fail the release on an open card naming a changeset it is about to consume) is not taken: the card itself says it "puts the backlog on the release path, which is a real cost that must be argued, not assumed". ⛔ Option 3 (correct at filing time) is not taken: #15058's body records why its source PR could not ride the edit in place.
⛔ Nothing here fails a build. The population — issue bodies — is a new scan population, so it is censused before anything is enforced. Only the offline
--self-testruns in CI.⭐ The census — the deliverable
Taken 2026-09-09 against
origin/main=87ad73b062,.changeset/corpus 53 files, 619 open issues scanned (27 open PRs filtered out):Read by hand, of the ten cards only four are members of the class the card describes — a card whose deliverable IS a line in a pending changeset. Their state today:
permissions-block-named-refusal.mdmainand still unconsumed"seed-locale-axis.mdstack-refusal-envelopes.md(#16671's target)operator-facing-raw-exec-cause-text.md⇒ The instance count is five, not three. #16859 and #17026 are two further silent expiries, both of which happened while #16850 sat in the queue. The remaining six cards cite a changeset as precedent, as a reading-table value or as provenance; they carry no deadline. ⛔ Nothing is live-and-exposed today: the one
window-openrow (#17003) names its path inside a quotedgit diff --statlisting, not as a deliverable.The card names it and this file obeys it:
The card's words, with its angle-bracket placeholders respelled so GitHub's body sanitizer cannot eat them:
git ls-tree REF -- PATHexits 0 even when nothing matches, so an&& echo PRESENTidiom reports PRESENT for a file that does not exist.⛔ No verdict here reads an exit code. Presence is a line count of
git show REF:PATH, corroborated against one.changeset/listing read per run — two instruments, neither a status. Every run establishes three controls before it judges a row, and REFUSES (exit 3) if any fails, because with a broken reader every row reads "consumed":Absent is not consumed. An absent target may live on an unmerged PR branch or be proposed, and calling those "consumed" would inflate the very number the census reports. So an absent path is asked whether it landed (
git log --diff-filter=A), and the answer is accepted only inside a history horizon proved byhistoryHorizon()— anchored per row on the card's own filing date, because agent containers clone shallow and a shallowgit loganswers from truncated history at exit 0 with no warning. Outside the horizon the row isinconclusiveand the run exits 2, so "not measured" cannot be read as "clean".What a machine cannot decide, printed by every run
asserts-pending. That flag is a HINT with a silent false-negative direction (#17026 carries the deadline and matches no phrase) and a false-positive one (#16973's "pending changeset" is an unrelated sentence) — ⛔ never a verdict. Every run prints its blind spots: bodies only, this board only, mention-is-not-deliverable,window-openmeans the file exists rather than the sentence being correct, and the hint's direction.Does the number justify an exit contract?
Not today, and the census is why. The number is not zero — the class is real and it has now failed five times — but every exposed row is a card whose window is already closed, so a gate switched on now would red on history nobody can act on. What the number does justify is exactly what landed: a runnable census a seat takes before a release, plus the standing observation that the one row worth watching (#17167) becomes exposed the moment PR #17073 merges. An exit contract is worth re-opening when a run finds a
window-openrow that IS a deliverable — the state this census has never yet observed.Verification
pnpm check:pm-changeset-deadline-census— self-test green, 5 batteries, roster floor enforced.node scripts/pm/dispatch-gates.mjs --ran— 62 derived, 62 run, 0 NOT-MEASURED, 0 UNRUN.pnpm exec eslint . --no-inline-config --format jsonat91a204865a— 6444 files, 0 errors, 0 warnings (whole tree, not narrowed).check:dts-closure,check:dual-build-cjs-loads,check:lean-entry-closure,check:sourcemap-no-sources-content,check:type-check-debt): each reads builtdist/, which this worktree has not built. ⛔ Read as NOT MEASURED, not as green and not as red — and none of them can move on this diff, whose three paths are input to no package build.grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'over all three changed files — no hits.验收备注
noted, not filed:.changeset/console-82a94170c405.md(dispatch-gates: STAGE-THEN-RUN reaches a program by an edge neither follow traverses — check:objectui-changeset inherits nothing from scripts/bump-objectui.sh #14290) is an objectui-generated changeset name. The census reports this board only; a card here can name a path whose real home is a sibling repo, and the run prints that as a blind spot. Carrier: whoever adopts this census inobjectui.noted, not filed:theasserts-pendingphrase list is a hint, and.changeset/seed-locale-axis.mdships two present-tense claims that PR #17013 makes false, and it is queued in the pending release PR #15334 — the correction cannot be made from the PR that falsifies it #17026 — a textbook member of the class — matches none of its phrases. Widening it is a precision/recall trade the census has no data to settle yet. Carrier: the next run that reads a non-zerowindow-opendeliverable.🤖 Generated with Claude Code
https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
Generated by Claude Code